package com.gientech.sys.pieChart;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gientech.common.view.DataGrid;
import com.gientech.core.base.BaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 产品饼图--Service
 * 
 * @author 胡砥峰
 */
@Slf4j
@Service
@Transactional
public class SysPieChartService extends BaseService<SysPieChartMapper, SysPieChart> {

	@Autowired
	private SysPieChartService sysPieChartService;

	/**
	 * 【1】查询和分页
	 * 
	 * @param dto
	 *
	 * @return
	 */
	public DataGrid<SysPieChartVO> listPieChart(SysPieChartDTO4List dto) {
		log.info("【list查询条件--功能】" + dto);

		// 【2】构造分页参数
		Page<SysPieChartVO> page = new Page<>(dto.getPageNo(), dto.getPageSize());

		return new DataGrid<SysPieChartVO>(this.getBaseMapper().getSysPieChartList(page, dto), page.getTotal());
	}


}
